/*
 * @Author: 杜兜兜
 * @Date: 2025-03-15 18:38:05
 * @LastEditTime: 2025-03-27 13:59:35
 * @motto: Still water run deep
 * @Description: Modify here please
 * @FilePath: \hici_cloud_web\src\api\mes\wm\rtsalse.js
 */
import request from "@/utils/request";

// 查询产品销售退货单列表
export function listRtsalse(query) {
  return request({
    url: "/mes/wm/rtsalse/list",
    method: "get",
    params: query,
  });
}

// 查询产品销售退货单详细
export function getRtsalse(rtId) {
  return request({
    url: "/mes/wm/rtsalse/" + rtId,
    method: "get",
  });
}

// 新增产品销售退货单
export function addRtsalse(data) {
  return request({
    url: "/mes/wm/rtsalse",
    method: "post",
    data: data,
  });
}

// 修改产品销售退货单
export function updateRtsalse(data) {
  return request({
    url: "/mes/wm/rtsalse",
    method: "put",
    data: data,
  });
}

// 删除产品销售退货单
export function delRtsalse(rtId) {
  return request({
    url: "/mes/wm/rtsalse/" + rtId,
    method: "delete",
  });
}

export function execute(rtId) {
  return request({
    url: "/mes/wm/rtsalse/" + rtId,
    method: "put",
  });
}
//退货通知单执行退货
export function execute2(data) {
  return request({
    url: "/mes/wm/rtsalse/execute/",
    method: "get",
    params: data,
  });
}

//回写erp
export function saveToErp(rId) {
  return request({
    url: "/mes/k3cloud/api/wmRtSalse/saveToErp/" + rId,
    method: "get",
  });
}

export function printRtsalseline(rtId) {
  return request({
    url: "/mes/wm/rtsalseline/listById/" + rtId,
    method: "get",
  });
}
